#pragma once
#include <opencv2/opencv.hpp>
#include <string>
#include <vector>

using namespace cv;
using namespace std;

class FaceDetector {
public:
    FaceDetector();
    bool loadCascade(const string& cascadePath);
    vector<Rect> detectFaces(const Mat& frame);
    Mat extractFace(const Mat& frame, const Rect& faceRect);

private:
    CascadeClassifier faceCascade;
    Size minFaceSize;
    Size maxFaceSize;
};